﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using ifunction.WebChatApi.Client;
using ifunction.WebChatApi.Contract;
using WebChatResponseApplication;

namespace WebChatResponseApplication
{
    /// <summary>
    /// Class MessageResponser.
    /// </summary>
    public class MessageResponser : BaseMessageResponser
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="MessageResponser" /> class.
        /// </summary>
        public MessageResponser()
            : base("WeixinToken", "DefaultHelpMessage")
        {
        }

        /// <summary>
        /// Saves the message log.
        /// </summary>
        /// <param name="messageLog">The message log.</param>
        protected override void SaveMessageLog(MessageLog messageLog)
        {
            //Nothing here.
        }

        /// <summary>
        /// Responses the message.
        /// </summary>
        /// <param name="message">The message.</param>
        /// <returns>Message.</returns>
        protected override Message ResponseMessage(Message message)
        {
            var replyMessage = message.ReplyContent(this.DefaultHelpMessage);

            return replyMessage;
        }
    }
}